const { request, response } = require('express');
const express=require('express');

const app=express();
//路由
app.get('/house',(request,response)=>{

    response.end('hello express');
});
//主页
app.get('/',(request,response)=>{
   
    response.end('hello大厅');
});
app.post('/post',(request,response)=>{
    response.end('这是post请求');
});
app.all('/all',(request,response)=>{
    response.end('所有方式');
})

app.all('*',(request,response)=>{
    response.end('<h1>404 NOT FOUND</h1>');
});
app.listen(8000,()=>{
    console.log('服务启动成功');
})
